home *** CD-ROM | disk | FTP | other *** search
/ Sky at Night 2007 June / SAN CD 6-2007 CD-ROM 25.iso / pc / Software / AstroGrav_Win / Java / jre1.6.0 / lib / rt.jar / java / lang / Class$EnclosingMethodInfo.class (.txt) < prev    next >
Encoding:
Java Class File  |  2006-11-29  |  1.5 KB  |  60 lines

  1. package java.lang;
  2.  
  3. final class Class$EnclosingMethodInfo {
  4.    private Class<?> enclosingClass;
  5.    private String name;
  6.    private String descriptor;
  7.    // $FF: synthetic field
  8.    static final boolean $assertionsDisabled = !Class.class.desiredAssertionStatus();
  9.  
  10.    private Class$EnclosingMethodInfo(Object[] var1) {
  11.       if (var1.length != 3) {
  12.          throw new InternalError("Malformed enclosing method information");
  13.       } else {
  14.          try {
  15.             this.enclosingClass = (Class)var1[0];
  16.             if (!$assertionsDisabled && this.enclosingClass == null) {
  17.                throw new AssertionError();
  18.             } else {
  19.                this.name = (String)var1[1];
  20.                this.descriptor = (String)var1[2];
  21.                if (!$assertionsDisabled && (this.name == null || this.descriptor == null) && this.name != this.descriptor) {
  22.                   throw new AssertionError();
  23.                }
  24.             }
  25.          } catch (ClassCastException var3) {
  26.             throw new InternalError("Invalid type in enclosing method information");
  27.          }
  28.       }
  29.    }
  30.  
  31.    boolean isPartial() {
  32.       return this.enclosingClass == null || this.name == null || this.descriptor == null;
  33.    }
  34.  
  35.    boolean isConstructor() {
  36.       return !this.isPartial() && "<init>".equals(this.name);
  37.    }
  38.  
  39.    boolean isMethod() {
  40.       return !this.isPartial() && !this.isConstructor() && !"<clinit>".equals(this.name);
  41.    }
  42.  
  43.    Class<?> getEnclosingClass() {
  44.       return this.enclosingClass;
  45.    }
  46.  
  47.    String getName() {
  48.       return this.name;
  49.    }
  50.  
  51.    String getDescriptor() {
  52.       return this.descriptor;
  53.    }
  54.  
  55.    // $FF: synthetic method
  56.    Class$EnclosingMethodInfo(Object[] var1, Class.1 var2) {
  57.       this(var1);
  58.    }
  59. }
  60.